package com.prs.crm.dao.flow;

import java.util.Collection;
import java.util.List;

import com.prs.crm.dao.BaseDao;
import com.prs.crm.domain.flow.WorkFlow;
import com.prs.crm.domain.flow.WorkFlowInstance;
import com.prs.crm.domain.flow.WorkFlowInstanceNode;
import com.prs.crm.domain.flow.WorkFlowType;
import com.prs.crm.domain.sys.Form;

public interface WorkFlowInstanceDao extends BaseDao<WorkFlowInstance>{

	int countFlowInstance(WorkFlow workflow);
	WorkFlowInstance findInstance(Form form,WorkFlow flow);
	WorkFlowInstance findEnforeInstance(Form form);
	Collection<WorkFlowInstance> findFormInstance(Form form, WorkFlowType type,Integer state);
	void saveNode(WorkFlowInstanceNode node);
	WorkFlowInstance findByFormName(String name);
	List<WorkFlowInstance> getAllWorkFlowInstance();
}
